package ifosup.thibault.semaine;

import java.util.ArrayList;
import java.util.List;

public class JourDeLaSemaine extends Object {
	public static List<String> jours = new ArrayList<String>();
	// public static String[] jours = new String[7];
	public int numero = 0;
	public String nom;

	public JourDeLaSemaine(int n, String name) {

		// jours[n] = name;
		jours.add(name);
		this.numero = n;
		this.nom = name;
	}

	@Override
	public String toString() {
		return (nom.substring(0, 3)).toUpperCase();
	}

	static public void Affiche() {
		for (int i = 0; i < 7; i++) {
			System.out.println(JourDeLaSemaine.jours.get(i));
			// System.out.println(JourDeLaSemaine.jours[i]);
		}
	}

	static public void AfficheMercredi() {
		for (int i = 0; i < 7; i++) {
			// if (JourDeLaSemaine.jours[i].equals("Mercredi"))
			// System.out.println(JourDeLaSemaine.jours[i]);
			if (JourDeLaSemaine.jours.get(i).equals("Mercredi"))
				System.out.println(JourDeLaSemaine.jours.get(i));
		}
	}

}
